using GameEntitySystem;

namespace SCIENEW {
    public class FluidPipeDeviceBehavior : DeviceBehavior {
        public SubsystemFluidTransfer m_subsystemFluidTransfer;

        public FluidPipeDeviceBehavior(Project project) : base(project) {
            m_subsystemFluidTransfer = project.FindSubsystem<SubsystemFluidTransfer>(true);
        }

        public override void OnBlockGenerated(int value, int x, int y, int z, bool isLoaded) {
            m_subsystemFluidTransfer.OnPipeGenerated(x, y, z);
        }

        public override void OnBlockAdded(int value, int oldValue, int x, int y, int z) {
            m_subsystemFluidTransfer.OnPipeAdded(x, y, z);
        }

        public override void OnBlockRemoved(int value, int newValue, int x, int y, int z) {
            m_subsystemFluidTransfer.OnPipeRemoved(x, y, z);
        }

        public override void OnBlockModified(int value, int oldValue, int x, int y, int z) {
            m_subsystemFluidTransfer.OnPipeModified(x, y, z);
        }
    }
}